package behaviorType.visitor;

import java.util.ArrayList;
import java.util.Collection;

public class Main {

    public static void main(String[] args) {
        IVisitor visitor = new VisitorImpl();

        StringElementVisitable stringE = new StringElementVisitable("I am a String");
        visitor.visitString(stringE);

        Collection list = new ArrayList();
        list.add(new StringElementVisitable("I am a String1"));
        list.add(new StringElementVisitable("I am a String2"));
        list.add(new FloatElementVisitable(new Float(12)));
        list.add(new FloatElementVisitable(new Float(19)));
        list.add(new StringElementVisitable("I am a String3"));

        visitor.visitCollection(list);
    }

}
